<?=$this->load->view('include_header',null)?>
	<div id="top-panel">
		<div id="panel">
			<ul>
				<li class="current"><a href="<?=site_url('archive/idcard/'.$id)?>" class="report"><?=(empty($id))?"录入新":"编辑"?>客户基本信息</a></li>
				<?php if(!empty($info->id)):?><li><a id="printInfo" class="folder_table">打印本页信息</a></li><?php endif;?>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
<!-- table begin -->
<form method="post" id="form"  enctype="multipart/form-data" action="<?=site_url('schengen/cn_exten_update/'.$cateid)?>">

	<h3>中国附表</h3>
    <table width="100%">
    <thead>
        <tr>
          <td colspan="4" align="right"><img src="<?= (@$info->avatar)?@$info->avatar:'images/avatar.gif'?>" width="150" height="150" /></td>
		  <td align="right">
		  上传照片<br />
		  <input type="file" name="userphoto" /><br />
		  (.gif|.jpg|.png文件,最大1M)<br />
		  <?php if (@$info->attachment):?><a href="<?= @$info->attachment?>" target="_blank">点击下载附件</a><?php endif; ?>
		  &nbsp;&nbsp;&nbsp;&nbsp;上传附件<br />
		  <input type="file" name="userfile" /><br />
		  (.pdf|.zip|.rar|.doc,最大2M)		  </td>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="5" align="right">			
			<input type="hidden" name="id" value="<?=$id?>" />
			<input id="button1" type="submit" value="提交信息" />
			<input id="button2" type="reset" value="重置" />			</td>
        </tr>
    </tfoot>

    <tbody>
        <tr class="even">
            <td colspan="5"><div align="center"><strong>中 华 人 民 共 和 国 签 证 申 请 表 附表</strong></div></td>
        </tr>
        <tr class="odd">
            <td colspan="5">
			<input type="radio" name="version" value="1" <?= (@$info->version==1)?'checked':''?> />通用英文版&nbsp;&nbsp; 
			<input type="radio" name="version" value="2" <?= (@$info->version==2)?'checked':''?> />俄文&nbsp;&nbsp;
			<input type="radio" name="version" value="3" <?= (@$info->version==3)?'checked':''?> />法文&nbsp;&nbsp;
			<input type="radio" name="version" value="4" <?= (@$info->version==4)?'checked':''?> />西班牙文&nbsp;&nbsp; 
			<input type="radio" name="version" value="5" <?= (@$info->version==5)?'checked':''?> />葡萄牙葡文&nbsp;&nbsp;
			<input type="radio" name="version" value="6" <?= (@$info->version==6)?'checked':''?> />巴西葡文&nbsp;&nbsp;
			<input type="radio" name="version" value="7" <?= (@$info->version==7)?'checked':''?> />阿拉伯文&nbsp;&nbsp;
			<input type="radio" name="version" value="8" <?= (@$info->version==8)?'checked':''?> />韩文</td>
        </tr>
        <tr class="even">
            <td>英文姓名<br />
              Name in English</td>
            <td><input type="text" name="name" value="<?= @$info->name?>" /></td>
            <td>&nbsp;</td>
            <td>护照号码<br />
              Passport number</td>
            <td><input type="text" name="travel_document_num" value="<?= @$info->travel_document_num?>" /></td>
        </tr>
        <tr class="odd">
            <td>出生日期（年月日）<br />
              Date of birth (yyyy-mm-dd)</td>
            <td><input type="text" name="birth" value="<?= @$info->birth?>" id="birth" /></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr class="even">
            <td colspan="5"><strong>A、如申请到中国工作，请填写。If you are applying to work in China (Z-visa), please fill out the following:</strong></td>
        </tr>		
        <tr class="odd">
            <td>1.受教育程度<br />
              Level of education</td>
            <td colspan="4">
<input type="radio" name="edu_level" value="1" <?= (@$info->edu_level==1)?'checked':''?>/>本科 Bachelor  
<input type="radio" name="edu_level" value="2" <?= (@$info->edu_level==2)?'checked':''?>/>硕士 Master's
<input type="radio" name="edu_level" value="3" <?= (@$info->edu_level==3)?'checked':''?>/>博士或更高 Doctorate or higher <br />
<input type="radio" name="edu_level" value="4" <?= (@$info->edu_level==4)?'checked':''?>/>其他（请说明）Other (Please specify): &nbsp;&nbsp;&nbsp;<input name="edu_level_other" type="text" value="<?= @$info->edu_level_other?>" /></td>
        </tr>
        <tr class="even">
            <td colspan="2">2.最后学习的大学名称<br />
            	Name of your last school, college, university or other educational institution</td>
			<td colspan="3"><input name="last_school" type="text" value="<?= @$info->last_school?>" style="width:300px"/></td>
        </tr>
        <tr class="odd">
            <td colspan="2">3.专业<br />
              Your major or focus in studies</td>
			<td colspan="3"><input name="last_major" type="text" value="<?= @$info->last_major?>" style="width:300px" /></td>
        </tr>
        <tr class="even">
            <td colspan="2">4.职业技术资格<br />
            	Your professional or technical qualifications</td>
			<td colspan="3"><input name="qualifications" type="text" value="<?= @$info->qualifications?>" style="width:300px" /></td>
        </tr>

        <tr class="odd">
            <td colspan="2">5.在中国拟从事职业<br />
              Your intended occupation in China</td>
			<td colspan="3"><input name="occupation" type="text" value="<?= @$info->occupation?>" style="width:300px"/></td>
        </tr>
        <tr class="even">
            <td colspan="2">6.在中国拟就职单位名称、地址及联系电话<br />
              Name, address and phone number of your employer in China</td>
			<td colspan="3"><input name="employer" type="text" value="<?= @$info->employer?>" style="width:300px" /></td>
        </tr>
        <tr class="odd">
           <td colspan="2">7.就业许可编号<br />
             Number of your Alien Employment License</td>
			<td colspan="3"><input name="employment_license" type="text" value="<?= @$info->employment_license?>" style="width:300px" /></td>
        </tr>
        <tr class="even">
            <td colspan="5"><strong>B、如申请到中国留学，请填写。If you are applying to study in China（X-visa）, please fill out the following:</strong></td>
        </tr>
        <tr class="odd">
            <td>1.受教育程度<br />
              Level of education</td>
            <td colspan="4">
<input type="radio" name="stu_edu_level" value="1" <?= (@$info->stu_edu_level==1)?'checked':''?>/>本科 Bachelor  
<input type="radio" name="stu_edu_level" value="2" <?= (@$info->stu_edu_level==2)?'checked':''?>/>硕士 Master
<input type="radio" name="stu_edu_level" value="3" <?= (@$info->stu_edu_level==3)?'checked':''?>/>博士或更高 Doctorate or higher<br />
<input type="radio" name="stu_edu_level" value="5" <?= (@$info->stu_edu_level==5)?'checked':''?>/>其他（请说明）Other (Please specify): &nbsp;&nbsp;&nbsp;<input name="stu_edu_level_other" type="text" value="<?= @$info->stu_edu_level_other?>" /></td>
        </tr>
        <tr class="even">
            <td colspan="2">2.最后学习的大学名称<br />
            	Name of your last school, college, university or other educational institution</td>
			<td colspan="3"><input name="stu_last_school" type="text" value="<?= @$info->stu_last_school?>" style="width:300px"/></td>
        </tr>
        <tr class="odd">
            <td colspan="2">3.专业<br />
            	Your major or focus in studies</td>
			<td colspan="3"><input name="stu_last_major" type="text" value="<?= @$info->stu_last_major?>" style="width:300px"/></td>
        </tr>
        <tr class="even">
            <td colspan="2">4.职业技术资格<br />
            	Your professional or technical qualifications</td>
			<td colspan="3"><input name="stu_qualifications" type="text" value="<?= @$info->stu_qualifications?>" style="width:300px"/></td>
        </tr>

        <tr class="odd">
            <td colspan="2">5.在中国就读学校的名称、地址及联系电话<br />
            	Name, address and phone number of your school in China</td>
			<td colspan="3"><input name="stu_school" type="text" value="<?= @$info->stu_school?>" style="width:300px"/></td>
        </tr>
        <tr class="even">
            <td colspan="2">6.在中国学习的专业或课程<br />
            	Your major or course in China</td>
			<td colspan="3"><input name="stu_school_major" type="text" value="<?= @$info->stu_school_major?>" style="width:300px" /></td>
        </tr>
		
		<tr class="odd">
            <td colspan="5"><strong>C、如有使用同一本护照一同旅行的偕行人，请在下面填写偕行人情况。If someone else travelling with you shares the same passport with you, please give that person’s details below:</strong></td>
        </tr>
		
        <tr class="even">
            <td>偕行人 1/ Person 1.</td>
			<td colspan="4">
			  姓名Full name 
			  <input name="person1" type="text" value="<?= @$info->person1?>" /> 
			  &nbsp;&nbsp;性别Sex:
			  <input name="person1_sex" type="text" value="<?= @$info->person1_sex?>" /><br />
              出生日期Date of birth(yyyy-mm-dd) 
              <input name="person1_birth" type="text" value="<?= @$info->person1_birth?>" id="person1_birth" /></td>
        </tr>
        <tr class="odd">
            <td>偕行人2/ Person 2</td>
			<td colspan="4">
			 姓名Full name 
			  <input name="person2" type="text" value="<?= @$info->person2?>" /> 
			  &nbsp;&nbsp;性别Sex:
			  <input name="person2_sex" type="text" value="<?= @$info->person2_sex?>" /><br />
              出生日期Date of birth(yyyy-mm-dd) 
              <input name="person2_birth" type="text" value="<?= @$info->person2_birth?>" id="person2_birth" /></td>
        </tr>
        <tr class="even">
            <td>偕行人3/ Person 3</td>
			<td colspan="4">
			 姓名Full name 
			  <input name="person3" type="text" value="<?= @$info->person3?>" /> 
			  &nbsp;&nbsp;性别Sex:
			  <input name="person3_sex" type="text" value="<?= @$info->person3_sex?>" /><br />
              出生日期Date of birth(yyyy-mm-dd) 
              <input name="person3_birth" type="text" value="<?= @$info->person3_birth?>" id="person3_birth" /></td>
        </tr>
		
		<tr class="even">
            <td colspan="5"><strong>D、如不在国籍国申请签证，请填写。If you are applying for a visa in a country or territory other than the country of your nationality, please fill out the following:</strong></td>
        </tr>
        <tr class="odd">
            <td colspan="2">1.在当地的居留或停留时间？<br /> 
            	Duration of your stay in this country or territory</td>
            <td colspan="3"><input type="radio" name="stay_in_foreign" value="1" <?= (@$info->stay_in_foreign==1)?'checked':''?>/>
              少于6 个月Less than 6 months<br />
              <input type="radio" name="stay_in_foreign" value="2" <?= (@$info->stay_in_foreign==2)?'checked':''?>/>
              超过6个月More than 6 months<br />
			  <input type="radio" name="stay_in_foreign" value="3" <?= (@$info->stay_in_foreign==3)?'checked':''?>/>
              超过12个月More than 12 months</td>
        </tr>
        <tr class="even">
          <td colspan="2">2.持有何种当地的有效签证或居留证件？ <br />
          	What kind of visa or residence permit of this country or territory do you hold?</td>
            <td colspan="3">
              <input type="radio" name="permit_type" value="1" <?= (@$info->permit_type==1)?'checked':''?>/>
              有效居留证件Valid residence permit<br />
  <input type="radio" name="permit_type" value="2" <?= (@$info->permit_type==2)?'checked':''?>/>
              有效签证 Valid visa <br />
              <input type="radio" name="permit_type" value="3" <?= (@$info->permit_type==3)?'checked':''?>/> 无 None</td>
        </tr>
        <tr class="odd">
            <td colspan="2">3.签证或居留证件的号码及有效日期<br />
            	Number of your visa or residence permit and its expiration date</td>
            <td colspan="3">号码Number 
              <input type="text" name="permit_id" value="<?= @$info->permit_id?>" />
              <br />
              有效日期Expiry date (yyyy-mm-dd) 
              <input type="text" name="permit_expiry" value="<?= @$info->permit_expiry?>" id="permit_expiry"/></td>
        </tr>
        <tr class="even">
            <td colspan="2">4.持上述签证或居留许可是否被允许返回当前所在国家或地区?<br /> 
            	Do you have permission to return to this country or territory with the visa or residence permit above?</td>
            <td colspan="3"><input type="radio" name="is_permit_return" value="1" <?= (@$info->is_permit_return==1)?'checked':''?>/>
              是 Yes 
              <input type="radio" name="is_permit_return" value="0" <?= (@$info->is_permit_return==0)?'checked':''?>/>
              否 No</td>
        </tr>
        <tr class="odd">
            <td colspan="2">5.在当地住所的邮政地址<br />
            	Mailing address of your residence in this country or territory</td>
            <td colspan="3"><input name="foreign_address" type="text" value="<?= @$info->foreign_address?>" style="width:300px" /></td>
        </tr>
		        <tr class="odd">
            <td colspan="2">6.在当地的联系电话<br />
            	Your phone number in this country or territory</td>
            <td colspan="3"><input name="foreign_tel" type="text" value="<?= @$info->foreign_tel?>" /></td>
		        </tr>
        <tr class="odd">
            <td colspan="5">我谨声明，我理解上述内容和问题，所有填写内容真实无误。
<br /> I declare that I understand all contents and questions above, and that the information given is true and accurate.</td>
        </tr>
    </tbody>
	</table>
<!-- table end -->
</form>

			</div>
		</div>
		
		<?=$this->load->view('include_sidebar',array('id'=>$id,'forms'=>$forms))?>
	</div>

<script type="text/javascript">
$().ready(function() {
	$("#form").validate({
		rules: {
			version:"required",
			name:"required",
			travel_document_num:"required",
			birth:"required"
		}
	});
  
	$.datepicker.setDefaults(
		{
		dateFormat: 'yy-mm-dd',
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
		}
	);

	$("#birth").datepicker();
	$("#permit_expiry").datepicker();
	$("#person1_birth").datepicker();
	$("#person2_birth").datepicker();
	$("#person3_birth").datepicker();
	
	$("#email").autoMail();

	$("#printInfo").click(function(o) {
		var prints = [
			{rel_id: <?=$cateid?>, rec_id: <?=$id?>}
		]  ;
		
		var jdata = JSON.stringify(prints);
		//alert(jdata);
		$.post("<?=site_url('proxy/does/'.str_replace('==','',base64_encode('http://'.$_SERVER['SERVER_NAME'].':9090/javaprduct/servlet/test')))?>",{clients:jdata},function(msg){alert(msg)});
	});
	
	$("#printInfo").ajaxError(function(event,request, settings){
		//$(this).append("<li>出错页面:" + settings.url + "</li>");
		alert("无法访问"+ settings.url );
	}); 
 
});
</script>

<?=$this->load->view('include_footer',null)?>